<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,  initial-scale=1.0, user-scalable=0, minimum-scale=1.0,  maximum-scale=1.0" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <title><foreach name='lookblog' item='v'>{$v.title}</foreach></title>
    <link rel="stylesheet" href="__PUBLIC__/css/style.css" media="screen" type="text/css" />
    <link rel="stylesheet" href="__PUBLIC__/css/public.css" type="text/css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/font-awesome.min.css"/>
    <link rel='stylesheet' href='__PUBLIC__/css/bootstrap.css' type='text/css' media='all' />
    <script type='text/javascript' src='__PUBLIC__/js/jquery-2.1.1.min.js'></script>
    <script type='text/javascript' src='__PUBLIC__/js/bootstrap.js'></script>
    <script type='text/javascript' src='__PUBLIC__/js/ajax.js'></script>
</head>
<body>
<script type="text/javascript">
    var AddTopUrl = "{:U('/Home/Blog/addtop')}";
    var DelTopUrl = "{:U('/Home/Blog/deltop')}";
    var AddCommentUrl = "{:U('/Home/Blog/addcomment')}";
 function del(){
    if(confirm("确定要删除吗？")){
        return true;
    }
    else{
        return false;
    }
}
</script>
    <div class="container">
            <include file='Common:header'/>
              <div id="info"></div>
        <div class="look-blog cgx-txt clearfix">
        <foreach name='lookblog' item='v'>
            <h1 class="center-h1">
                {$v.title}
            </h1>
                 <p class="look-blog-ico">
                <span><i class="fa fa-user"></i><a href="#">{$v.author}</a></span>
                <span class="blog-box-ico"><i class="fa fa-thumbs-up"></i>{$v.top}</span>
                <span class="blog-box-ico"><i class="fa fa-eye"></i>{$v.visits}</span>
                <span class="blog-box-ico"><i class="fa fa-clock-o"></i>{$v.time|date='Y-m-d H:i:s', ###}</span>
                </p>
            <div class="rzck-txt-box">
                <h2>本周总结</h2>
                <p>{$v.bzzj}</p>
            </div>
            <div class="rzck-txt-box">
                <h2>下周计划</h2>
                <p>{$v.xzjh}</p>
            </div>
            <div class="rzck-txt-box">
                <h2>建议反馈</h2>
                <p>{$v.yjfk}</p>
            </div>

            <form name="formtop" id="BlogTop" method="post" action="">
            <input type="hidden" name="Topbid" value="{$v.id}"/>
            <input type="hidden" name="Topuid" value="<?php echo session('id'); ?>"/>
            <if condition="$deltop neq ''">
                <a class="ding alrtop deltop">
                <i class="fa fa-thumbs-up"></i>取消</a>
                <else/>
                <a class="ding addtop">
                <i class="fa fa-thumbs-up"></i>赞</a>
            </if>
            </form>

            <div class="ding-box">
                <foreach name='top' item='value'>
                    <a href="{:U('/Home/User/look', array('id' => $value['uid']))}">{$value.name}</a>、
                </foreach>
                觉得很赞，共计{$v.top}次。
            </div>
        </foreach>
            <div class="comment-box clearfix">
            <ul>
            <foreach name='comment' item='v'>
                <li class="comment">
                    <span class="comment-user">
                        <a href="{:U('/Home/User/look', array('id' => $v['uid']))}">
                        <img src="{$v.img}" alt="{$v.name}" width="50px" height="50px">
                        <p>{$v.name}</p>
                        </a>
                    </span>
                    <p class="comment-content">{$v.content}
                        <span>
                        <if condition="session('id') eq $v['uid']">
                        <a href="{:U('/Home/Blog/delcomment', array('id' => $v['id']))}" onclick='return del();'><i class='fa fa-trash'></i></a>
                        </if>
                        <i class="fa fa-clock-o"></i>{$v.time|date='Y-m-d H:i', ###}</span>
                    </p>
                </li>
            </foreach>
                    <div class="msg-page">
                        <div class="page">{$page}</div>
                    </div>
            </ul>
                    <div class="txt-srk">
                        <textarea name="content" required></textarea>
                        <input type="hidden" name="ComBid" value="<foreach name='lookblog' item='v'>{$v.id}</foreach>"/>
                    </div>
                        <input type="submit" class="rzck-btn-box" id="AddCommentBnt" id="submit-button" value="提&nbsp;&nbsp;交">

            </div>
        </div>
    </div>
    <script src="__PUBLIC__/js/index.js"></script>
</body>
</html>